package com.ruoyi.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.dto.WsdPaymentRecordsDTO;
import com.ruoyi.common.core.domain.entity.WsdPaymentRecords;
import com.ruoyi.common.core.domain.vo.ChartDataVO;
import com.ruoyi.common.core.domain.vo.FinancialOrderFoodVO;
import com.ruoyi.common.core.domain.vo.WsdPaymentRecordsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 充值缴费记录表 Mapper 接口
 * </p>
 *
 * @author wwq
 * @since 2024-05-18
 */
@Mapper
public interface WsdPaymentRecordsMapper extends BaseMapper<WsdPaymentRecords> {

    WsdPaymentRecords byTransactionId(String transactionId);
    List<WsdPaymentRecordsVO> selectWsdPaymentRecordsList(WsdPaymentRecordsDTO wsdPaymentRecordsDTO);

    List<WsdPaymentRecords> selectList(WsdPaymentRecords wsdPaymentRecords);
    List<Map<String, Object>> getTotalFeeByYear();

    List<Map<String, Object>> getTotalFeeByMonth();

    List<Map<String, Object>> getTotalFeeByDateRange(@Param("startDate") String startDate, @Param("endDate") String endDate);

    List<WsdPaymentRecords> selectWsdPaymentRecords(WsdPaymentRecords wsdPaymentRecords);

    WsdPaymentRecords selectWsdPaymentRecordsByPaymentId(Long paymentId);

    //修改余额
    public int updateWsdPaymentRecords(WsdPaymentRecords wsdPaymentRecords);
    FinancialOrderFoodVO financialOrderFoodVOList(@Param("schoolId") Long schoolId, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime,@Param("configId") Long configId,@Param("gradeId") Long gradeId);

    List<Map<String, Object>> getTotalFeeByWeek(@Param("schoolId") Long schoolId, @Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
}
